package com.xt.LibaryDeskManager.dao;

import com.xt.LibaryDeskManager.dto.MessageDto;
import com.xt.LibaryDeskManager.vo.MessageVo;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface MessageMapper {
    /**
     * 获取公告总数量
     * @return
     * @throws Exception
     */
    int getCount() throws Exception;

    /**
     * 获取所有公告
     * @return
     * @throws Exception
     */
    List<MessageDto> getAllMessage() throws Exception;

    /**
     * 删除公告
     * @param mid
     * @return
     * @throws Exception
     */
    int deleteMessage(int mid)throws Exception;

    /**
     * 更新公告
     * @param messageVo
     * @return
     * @throws Exception
     */
    int updateMessage(MessageVo messageVo)throws Exception;

    /**
     * 添加公告
     * @param messageVo
     * @return
     * @throws Exception
     */
    int addMessage(MessageVo messageVo)throws Exception;
}
